package it.andreaartuso.paletta.activity;

import it.andreaartuso.paletta.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public class SplashActivity extends Activity {
	
	private static final String TAG = "SplashActivity";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
//		overridePendingTransition(R.anim.slide_up, R.anim.slide_up);
		this.setContentView(R.layout.splash);
		Thread timer = new Thread(){
			@Override
			public void run() {
				super.run();
				try {
					sleep(1500);
					Log.i(TAG,"sleep 1500");
				} catch (Exception ex) {
					ex.printStackTrace();
				} finally {
					Intent openMainActivityIntent = new Intent(".activity.MAINACTIVITY");
					startActivity(openMainActivityIntent);
				}
			}
		};
		timer.start();
	}

	@Override
	protected void onPause() {
		super.onPause();
		this.finish();
	}
	
}